The present invention relates generally to a method for transferring data, and more particularly to a method for transferring data from a host computer to a storage media using selectable caching strategies.
Write-back caching is an exemplary environment for transferring data from an initiator device to a target device. Write-back caching refers to a method of executing write requests where an initiator device such as a host computer transfers write request data to a target device such as a caching disk array controller which then transfers the write request data to storage media. Depending upon the particular write-back caching strategy being implemented by the controller, the write request data can either be written immediately to the storage media, or the write request data can be temporarily stored in a cache memory as unwritten or xe2x80x9cdirty dataxe2x80x9d and then xe2x80x9cflushedxe2x80x9d or written to the storage media at some later point in time. In both cases, the controller sends back status information to the host computer indicating that the write request is complete so that the host computer can continue executing a software application. What is meant herein by the use of the term xe2x80x9cdirty dataxe2x80x9d is data that is located in cache memory which is not yet been written to storage media. To provide meaning to the following terms xe2x80x9cflushxe2x80x9d, xe2x80x9cflushedxe2x80x9d or xe2x80x9cflushingxe2x80x9d which are used herein, it should be appreciated that the act of xe2x80x9cflushingxe2x80x9d data means writing dirty data to storage media.
The performance of a host computer when executing a certain software application is dependent, at least in part, upon the particular caching strategies that are implemented by the caching disk array controller. More specifically, the performance of the host computer can be optimized by implementing the most appropriate caching strategies for the particular software application being executed.
With regard to write-back caching, the host computer may experience optimal performance when executing a first software application with write request data written immediately to storage media, while the host computer may experience optimal performance when executing a second software application with write request data stored in cache memory for as long as possible before it is written to storage media. Further, the host computer may experience optimal performance when executing a third software application with write request data stored in cache memory for a particular time interval, or until a particular amount of write request data has been stored in the cache, before it is written to storage media.
Heretofore, a host computer was unable to adjust or tune the caching strategy used for writing its write request data to storage media during execution of various software applications. It would therefore be desirable to provide a method in which the host computer would adjust the caching strategy used for writing its write request data to storage media during execution of various software applications so that the host computer could optimize its performance during execution of the various software applications.
In accordance with one embodiment of the present invention, there is provided a method for transferring data to a storage medium. The method includes the steps of (1) providing a controller having a cache memory, (2) generating a cache-flushing parameter in the host computer, (3) transferring the cache-flushing parameter from the host computer to the controller, and (4) writing a quantity of write request data from the cache memory of the controller to the storage medium in accordance with the cache-flushing parameter.
Pursuant to another embodiment of the present invention, there is provided a method of transferring data from a host computer to a storage media. The method includes the steps of (1) sending a first caching parameter which defines a first caching strategy to a controller, (2) transferring a first quantity of data from the host computer to the storage media based on the first caching parameter, (3) sending a second caching parameter which defines a second caching strategy to the controller, and (4) transferring a second quantity of data from the host computer to the storage media based on the second caching parameter.
Pursuant to yet another embodiment of the present invention, there is provided a method for transferring data to a storage device. The method includes the steps of (1) updating a cache-flushing parameter associated with a cache memory, and (2) flushing the cache memory to the storage device in accordance with the cache flushing parameter after the updating step.
Pursuant to still yet another embodiment of the present invention, there is provided a method for controlling cache flushing characteristics of a storage device, with the storage device having a controller which includes a cache memory. The method includes the steps of (1) sending a cache-flushing parameter to the controller, and (2) flushing the cache memory of the controller in accordance with the cache-flushing parameter.
It is therefore an object of the present invention to provide a new and useful method for dynamically changing a cache flushing algorithm.
It is another object of the present invention to provide a new and useful method of changing cache flushing characteristics through host selectable parameters.
It is a further object of the present invention to provide a new and useful method for varying how much of a cache memory will be flushed at one time using a host selectable parameter.
It is yet another object of this invention to provide a new and useful method for varying a time interval for writing unwritten write request data to a storage media.
The above and other objects, features, and advantages of the present invention will become apparent from the following description and the attached drawings.